<%--@elvariable id="message" type="java.lang.String"--%>
<%--@elvariable id="notRight" type="java.lang"--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <%@include file="../../common.jsp" %>
    <!-- BEGIN THEME STYLES -->
    <link href="assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
    <link href="assets/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="assets/css/plugins.css" rel="stylesheet" type="text/css"/>
    <link href="assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/>
    <link href="assets/css/pages/login.css" rel="stylesheet" type="text/css"/>
    <link href="assets/css/custom.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css"
          href="<c:url value="/assets/plugins/bootstrap-toastr/toastr.min.css"/>"/>
    <!-- END THEME STYLES -->
    <style type="text/css">
        #content {
            opacity: 0.7;
            filter: alpha(opacity=40); /* For IE8 and earlier */
        }

        #content:hover {
            opacity: 1.0;
            filter: alpha(opacity=100); /* For IE8 and earlier */
        }
    </style>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="login">
<!-- BEGIN LOGO -->
<div class="logo">
    <a href="/scorm/">
        <img src="<c:url value="/img/logo/logo_3.png"/>" style="width: 150px" alt="logo"/>
    </a>
</div>
<!-- END LOGO -->
<!-- BEGIN LOGIN -->
<div class="content" id="content">
    <!-- BEGIN LOGIN FORM -->
    <form class="login-form" action="login" method="post">
        <h3 class="form-title">欢迎进入 SCROM 学习平台</h3>

        <div class="form-group">
            <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
            <label for="username" class="control-label visible-ie8 visible-ie9">账号</label>

            <div class="input-icon">
                <i class="fa fa-user"></i>
                <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="账号"
                       name="username" id="username"/>
            </div>
        </div>
        <div class="form-group">
            <label for="password" class="control-label visible-ie8 visible-ie9">密码</label>

            <div class="input-icon">
                <i class="fa fa-lock"></i>
                <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="密码"
                       name="password" id="password"/>
            </div>
        </div>

        <div class="form-group">
            <label for="captcha" class="control-label visible-ie8 visible-ie9"> </label>

            <div class="input-icon">
                <input class="form-control placeholder-no-fix" autocomplete="off"
                       placeholder="验证码" id="captcha" name="captcha"/>
                <img style="height:30px;cursor:pointer;vertical-align:middle;"
                     title="看不清楚？换一个"
                     id="captchaImage" src="captcha">
                <a id="captchaTitle" style="cursor: pointer">看不清楚？换一个</a>
            </div>
        </div>

        <div class="form-actions">
            <label class="checkbox">
                <input type="checkbox" name="rememberMe" value="true"/>记住我
            </label>
        </div>

        <div class="form-actions">
            <button id="login-back-btn" type="button" class="btn">
                <i class="m-icon-swapleft"></i> 返回
            </button>
            <button type="                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 "
                    class="btn green pull-right">
                登录 <i class="m-icon-swapright m-icon-white"></i>
            </button>
        </div>

        <div class="login-options">
            <h4>其他登录</h4>
            <ul class="social-icons">
                <li>
                    <a class="googleplus" data-original-title="Goole Plus" href="#">
                    </a>
                </li>
            </ul>
        </div>

        <div class="forget-password">
            <h4>忘记密码 ?</h4>

            <p>
                点击
                <a href="javascript:" id="forget-password">
                    这里
                </a>
                找回密码！
            </p>
        </div>

        <div class="create-account">
            <p>
                还没有账号吗 ?&nbsp;
                <a style="cursor: pointer" href="public/register">
                    创建一个吧！
                </a>
            </p>
        </div>
    </form>
    <!-- END LOGIN FORM -->
    <!-- BEGIN FORGOT PASSWORD FORM -->
    <form class="forget-form" action="public/forget" method="post">

        <c:if test="${!notRight}">
            <h3>忘记密码 ?</h3>

            <p style="color: red">
                找回密码需要正确填写确认信息
            </p>
        </c:if>
        <c:if test="${notRight}">
            <h3>确认信息输入错误 ！</h3>

            <p style="color: red">
                可能是字母大小写输入错误，请重新填写！
            </p>
        </c:if>

        <div class="form-group">
            <div class="input-icon">
                <i class="fa fa-user"></i>
                <input class="form-control placeholder-no-fix" type="text" autocomplete="off" id="loginName"
                       placeholder="账号"
                       name="loginName"/>
            </div>
        </div>

        <div class="form-group">
            <div class="input-icon">
                <i class="fa fa-question"></i>
                <input class="form-control placeholder-no-fix" type="text" autocomplete="off" id="comQuestion"
                       placeholder="确认信息"
                       name="question"/>
            </div>
        </div>

        <div class="form-actions">
            <button type="button" id="back-btn" class="btn">
                <i class="m-icon-swapleft"></i> 返回
            </button>
            <button type="submit" class="btn blue pull-right">
                提交 <i class="m-icon-swapright m-icon-white"></i>
            </button>
        </div>
    </form>
    <!-- END FORGOT PASSWORD FORM -->
</div>
<!-- END LOGIN -->
<!-- BEGIN COPYRIGHT -->
<div class="copyright">
    2014 &copy; 长春工业大学. 苏格拉没有底开发小队 版权所有
</div>
<!-- END COPYRIGHT -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
<!--[if lt IE 9]>
<script src="assets/plugins/respond.min.js"></script>
<script src="assets/plugins/excanvas.min.js"></script>
<![endif]-->
<script src="assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery.cokie.min.js" type="text/javascript"></script>
<script src="assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script src="assets/plugins/jquery-validation/dist/jquery.validate.min.js" type="text/javascript"></script>
<script src="assets/plugins/backstretch/jquery.backstretch.min.js" type="text/javascript"></script>
<script type="text/javascript" src="assets/plugins/select2/select2.min.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="assets/scripts/core/app.js" type="text/javascript"></script>
<script src="<c:url value="/js/login.js"/>"></script>
<script src="<c:url value="/js/global/toast.js"/>"></script>
<script type="text/javascript" src="<c:url value="/assets/plugins/bootstrap-toastr/toastr.js"/>"></script>

</body>
<!-- END BODY -->
</html>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
    if (top != window) {
        top.location.href = "login"
    }

    jQuery(document).ready(function () {
        App.init();
        Login.init();
        <c:if test="${notRight}">
        $('#forget-password').click();
        </c:if>

        <c:if test="${message!=null}">
        toast.error("${message}");
        </c:if>
    });
</script>
<!-- END JAVASCRIPTS -->